//
//  HomePageShowStepDetailLabel.m
//  project
//
//  Created by 黄建华 on 2017/11/24.
//  Copyright © 2017年 黄建华. All rights reserved.
//

#import "SNHomePageShowStepDetailLabel.h"

@implementation SNHomePageShowStepDetailLabel

/*
 // Only override drawRect: if you perform custom drawing.
 // An empty implementation adversely affects performance during animation.
 - (void)drawRect:(CGRect)rect {
 // Drawing code
 }
 */

- (instancetype)initWithFrame:(CGRect)frame {
    self = [super initWithFrame:frame];
    if (self) {
        [self loadLabel];
    }
    return self;
}

- (void)loadLabel {
    _dotImageV       = [[UIImageView alloc] initWithFrame:SNFRAME(0, -10, 40, 40)];
    _dotImageV.image = [UIImage imageNamed:@"选中"];
    [self addSubview:_dotImageV];
    
    _label               = [[UILabel alloc] initWithFrame:SNFRAME(30, 0, 300, 20)];
    _label.textAlignment = NSTextAlignmentLeft;
    _label.textColor     = [UIColor blackColor];
//    _label.font          = SNFONT(12.0);
    _label.font = SNFONTMIN(12.0);
    [self addSubview:_label];
}

- (void)reloadLabel {
    if (_dotImageV.isHidden) {
        _label.frame = SNFRAME(0, 0, 300, 20);
    } else {
        _label.frame = SNFRAME(0, 0, 300 - 25, 20);
    }
}

@end

